import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";

@Entity("setting_attr_model", { schema: "charge" })
export class SettingAttrModel {
  @PrimaryGeneratedColumn({ type: "int", name: "id", unsigned: true })
  id: number;

  @Column("varchar", { name: "name", length: 60 })
  name: string;

  @Column("json", { name: "settings", nullable: true })
  settings: object | null;

  @Column("json", { name: "attrs", nullable: true })
  attrs: object | null;

  @Column("int", { name: "create_time", unsigned: true, default: () => "'0'" })
  createTime: number;

  @Column("int", { name: "update_time", unsigned: true, default: () => "'0'" })
  updateTime: number;
}
